﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LearnDrive
{
    public partial class frmShow : Form
    {
        public string cx;
        public string code;
        public string sx;
        public frmShow(int chexing, string c, string s)
        {
            InitializeComponent();
            if (chexing == 1)
                cx = "C1C2C3C4";
            else if (chexing == 2)
                cx = "A1A3B1";
            else if (chexing == 3)
                cx = "A2B2";
            else if (chexing == 4)
                cx = "DEF";
            code = c;
            sx = s;
        }

        private void frmShow_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            int w = 0, h = 0;
            w = this.Width;
            h = this.Height;
            w = (w - panel1.Width) / 2;
            h = (h - panel1.Height) / 2;
            panel1.Location = new Point(w, h);
            //label1.LineDistance = 50;
            label1.Text = "考试须知\r\n\r\n1、遵守考场纪律,服从监考人员指挥。 \r\n\r\n2、进入考场,手机关机.禁止抽烟, 禁止吃零食。 \r\n\r\n3、未经工作人员允许,考生禁止随意出入考场。 \r\n\r\n4、考场内禁止大声喧哗,禁止随意走动。 \r\n\r\n5、考试中认真答题,不准交头接耳。 \r\n\r\n6、考试中不准冒名顶替,不准弄虚作假。 \r\n\r\n7、注意考场卫生,禁止随地吐痰,禁止乱扔纸屑。 \r\n\r\n8、爱护公物及考试设备.损坏赔偿。";
            Random r = new Random();
            int i = r.Next(60);
            MySelect.changci = i.ToString("000");
            label2.Text = string.Format("机动车考场{0}考台", i.ToString("000"));
            label3.Text = string.Format("身份证号：{0}", Myinfo.SNO);
            label4.Text = string.Format("考生姓名：{0}", Myinfo.usertruename);
            label5.Text = string.Format("考试车型：{0}", cx);

        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (sx != "")
            {
                
                frmStudy f = new frmStudy(sx);
                f.Show();
            }
            else
            {
                
                frmStudy f = new frmStudy();
                f.Show();

            }
            this.Close();
            
        }
    }
}
